﻿@model IEnumerable<Sdari.Api.DbModel.ApiWhitelist>

@{
    ViewData["Title"] = "Index";
}

<h1>Index</h1>

<p>
    <a asp-action="Create">Create New</a>
</p>
<table class="table">
    <thead>
        <tr>
            <th hidden>
                @Html.DisplayNameFor(model => model.Uid)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.Value)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.Type)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.IsValid)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.Creator)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.CreateDate)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.LastUpdater)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.LastUpdatedDate)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.ApiU)
            </th>
            <th></th>
        </tr>
    </thead>
    <tbody>
@foreach (var item in Model) {
        <tr>
            <td hidden>
                @Html.DisplayFor(modelItem => item.Uid)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.Value)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.Type)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.IsValid)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.Creator)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.CreateDate)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.LastUpdater)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.LastUpdatedDate)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.ApiU.Address)
            </td>
            <td>
                <a asp-action="Edit" asp-route-id="@item.Id">Edit</a> |
                <a asp-action="Details" asp-route-id="@item.Id">Details</a> |
                <a asp-action="Delete" asp-route-id="@item.Id">Delete</a>
            </td>
        </tr>
}
    </tbody>
</table>
